package org.grow.present.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.grow.present.dto.ApplierPurchaseQC;
import org.grow.present.dto.AuditorPurchaseQC;
import org.grow.present.dto.ExpensesAnaDetailQC;
import org.grow.present.entity.PurchaseBill;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.grow.present.entity.PurchaseItem;

import java.util.List;

/**
 * @author xieweig
 * @description 针对表【PurchaseBill】的数据库操作Mapper
 * @createDate 2024-06-05 23:36:27
 * @Entity org.grow.present.entity.PurchaseBill
 */
@Mapper
public interface PurchaseBillMapper extends BaseMapper<PurchaseBill> {

    PurchaseBill findWholeById(@Param("id") String id);

    int saveItems(@Param("items") List<PurchaseItem> items);

    Page<PurchaseBill> dynamicQueryApplier(Page<PurchaseBill> page, @Param("qc") ApplierPurchaseQC qc, @Param("UID") String UID);

    Page<PurchaseBill> dynamicQueryAuditor(Page<PurchaseBill> page, @Param("qc") AuditorPurchaseQC qc, @Param("UID") String UID);

    int removeById(@Param("id") String id);

//    int removeItems(@Param("ids") List<String> ids);
    int removeItems(@Param("id") String id);

    Page<PurchaseBill> anaQuery(Page<PurchaseBill> page,@Param("qc") ExpensesAnaDetailQC qc);
}




